{% extends "simple_table.html" %}

{% block title %}Locomotive journal{% endblock %}

{% block header %}
<h1>Journal entries list</h1>
{% endblock %}

{% block current_path %}
<p>Locomotives ({{ loc }})</p>
{% endblock %}

{% block menu %}
<ul>
    <li><a href="{% url locomotive_detail loc.id %}">Back to locomotive</a></li>
    <li>asdf</li>
    <li>asdf</li>
    <li>asdf</li>
    <li>asdf</li>
</ul>
{% endblock %}

{% block table_header %}
<thead>
    <tr>
        <th>Date</th>
        <th>Description</th>
        <th class="action">Detail</th>
        <th class="action">Delete</th>	
        <th class="action">Modify</th>
    </tr>
</thead>
{% endblock %}

{% block table_body %}
<tbody>
    {% for o in object_list %}
    <tr class="{% cycle odd,even %}">
		<td>{{ o.log_date }}</td>
		<td>{{ o.log_record }}</td>
		<td class="action"><a href="">Details</a></td>
		<td class="action"><a href="{% url locjournal_delete locomotive_id=loc.id,object_id=o.id %}">Delete</a></td>
        	<td class="action"><a href="{% url locjournal_update locomotive_id=loc.id,object_id=o.id %}">Modify</a></td>
	</tr>
	{% endfor %}
</tbody>
{% endblock %}

{% block empty_list %}
<p>No journal entries present</p>
{% endblock %}

{% block manage_buttons %}
<p><a href="{% url locjournal_add loc.id %}">Add journal entry</a></p>
{% endblock %}